<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('员工信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>姓名：</label>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <label>政治面貌：</label>
                                <input type="text" name="politicalOutlook"/>
                            </li>
                            <li>
                                <label>专业：</label>
                                <input type="text" name="specialty"/>
                            </li>
                            <li>
                                <label>职称：</label>
                                <input type="text" name="title"/>
                            </li>
                            <li>
                                <label>入职时间：</label>
                                <input type="text" class="time-input" placeholder="请选择入职时间" name="entryTime"/>
                            </li>
                            <li>
                                <label>部门名称：</label>
                                <input type="text" name="deptName"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:staff:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:staff:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:staff:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:staff:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:staff:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:staff:remove')}]];
        var prefix = ctx + "system/staff";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "员工信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'ID',
                    visible: false
                },
                {
                    field: 'name',
                    title: '姓名'
                },
                {
                    field: 'gender',
                    title: '性别'
                },
                {
                    field: 'birthday',
                    title: '出生日期'
                },
                {
                    field: 'nativePlace',
                    title: '籍贯'
                },
                {
                    field: 'politicalOutlook',
                    title: '政治面貌'
                },
                {
                    field: 'marriage',
                    title: '婚姻状况'
                },
                {
                    field: 'education',
                    title: '学历'
                },
                {
                    field: 'specialty',
                    title: '专业'
                },
                {
                    field: 'title',
                    title: '职称'
                },
                {
                    field: 'idCardNumber',
                    title: '身份证号码'
                },
                {
                    field: 'graduationSchool',
                    title: '毕业院校'
                },
                {
                    field: 'graduationTime',
                    title: '毕业时间'
                },
                {
                    field: 'telephone',
                    title: '联系手机'
                },
                {
                    field: 'address',
                    title: '联系地址'
                },
                {
                    field: 'contactName',
                    title: '紧急联系人名称'
                },
                {
                    field: 'relationship',
                    title: '紧急联系人关系'
                },
                {
                    field: 'contactTelphone',
                    title: '紧急联系人电话'
                },
                {
                    field: 'personalPhotos',
                    title: '个人照片'
                },
                {
                    field: 'educationalPhotos',
                    title: '学历照片'
                },
                {
                    field: 'otherCertificatePhotos',
                    title: '其他证书照片'
                },
                {
                    field: 'skill',
                    title: '技能'
                },
                {
                    field: 'entryTime',
                    title: '入职时间'
                },
                {
                    field: 'post',
                    title: '入职职务'
                },
                {
                    field: 'probationSalary',
                    title: '试用薪资'
                },
                {
                    field: 'fullMemberSalary',
                    title: '转正薪资'
                },
                {
                    field: 'leavingCertificatePhotos',
                    title: '离职证明照片'
                },
                {
                    field: 'email',
                    title: '邮箱'
                },
                {
                    field: 'status',
                    title: '状态'
                },
                {
                    field: 'bank',
                    title: '开户行'
                },
                {
                    field: 'bankCardNumber',
                    title: '银行卡号'
                },
                {
                    field: 'deptId',
                    title: '部门id'
                },
                {
                    field: 'deptName',
                    title: '部门名称'
                },
                {
                    field: 'socialSecurity',
                    title: '社保'
                },
                {
                    field: 'socialSecurityRatio',
                    title: '社保比例(公司)'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>